package
{
	/**
	 * Shared static variables
	 */ 
	public final class Common
	{
		// xml file name
		public static const XML_FILE:String = "../flashData.xml";
		
		public static const BACKGROUND_COLOR = 0xF0F0FF;
		
		// general coordinates
		public static const BUFFER_SIDE = 40;
		public static const LEFT_X = BUFFER_SIDE;
		public static const TOP_Y = 10;
		public static const COL_SPACE = 20;
		public static const ROW_SPACE = 20;
		
		// title
		public static const TITLE_WIDTH = 300;
		public static const TITLE_HEIGHT = 80;
		public static const TITLE_X = LEFT_X;
		public static const TITLE_Y = TOP_Y;
		
		// menu
		public static const FILTER_WIDTH:int = TITLE_WIDTH - WEATHER_WIDTH - COL_SPACE;
		public static const FILTER_HEIGHT:int = 125;
		public static const FILTER_X:int = TITLE_X;
		public static const FILTER_Y:int = TITLE_Y + TITLE_HEIGHT;
		public static const FILTER_PICTURES:String = "\tPictures";
		public static const FILTER_VIDEOS:String = "\tVideos";
		public static const FILTER_AUDIO:String = "\tAudio";
		public static const FILTER_NOTES:String = "\tNote";
		
		// media stream
		public static const MEDIA_WIDTH:int = 1024 - 2 * LEFT_X;
		public static const MEDIA_HEIGHT = 300; // height of the pictures by themselves
		public static const MEDIA_FULL_HEIGHT = 400; // height of picture wrapper including annotations
		public static const MEDIA_X = LEFT_X;
		public static const MEDIA_Y = LOCATION_Y + LOCATION_HEIGHT + ROW_SPACE;
		public static const PIC_BUTTON_WIDTH = 65;
		public static const PIC_BUTTON_HEIGHT = 65;
		public static const PIC_BUTTON_BUFFER:int = 15;
		
		// media types and names
		public static const M_PHOTO:String = "photo"; // must match the xml
		public static const M_NOTE:String = "note"; // must match the xml
		public static const M_AUDIO:String = "audio"; // must match the xml

		// photos
		public static const THUMB_WIDTH = 400;
		public static const THUMB_HEIGHT = 300;
		public static const PICTURE_WRAPPER = "pictureWrapper";
		public static const PIC_BACK_BUTTON = "picBackButton";
		public static const PIC_FORWARD_BUTTON = "picForwardButton";
		public static const VIEW_ALL_PICS = "viewAllPics";
		public static const URL_PHOTO_START:String = "http://hardon.stanford.edu/";
		
		// videos
		public static const VIDEO_WIDTH = 320;
		public static const VIDEO_HEIGHT = 240;
		public static const VIDEO_X = LEFT_X;
		public static const VIDEO_Y = MEDIA_Y + MEDIA_FULL_HEIGHT + ROW_SPACE;
		
		// notes
		public static const NOTE_HEIGHT:int = MEDIA_HEIGHT;
		public static const NOTE_WIDTH:int = NOTE_HEIGHT;
		
		// audio
		public static const AUDIO_HEIGHT:int = MEDIA_HEIGHT;
		public static const AUDIO_WIDTH:int = AUDIO_HEIGHT;
		
		// date
		public static const DATE_WIDTH = TITLE_WIDTH;
		public static const DATE_HEIGHT = TITLE_HEIGHT;
		public static const DATE_X = TITLE_X;
		public static const DATE_Y = TITLE_Y + TITLE_HEIGHT;
		public static const WEEKDAYS:Array = new Array ("Sunday","Monday","Tuesday","Wednesday",
			"Thursday","Friday","Saturday");
		public static const MONTHS:Array = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul",
			"Aug", "Sep", "Oct","Nov","Dec");
		
		// calendar button
		public static const CALENDAR_WIDTH = DATE_HEIGHT;
		public static const CALENDAR_HEIGHT = CALENDAR_WIDTH;
		public static const CALENDAR_X = DATE_X + DATE_WIDTH - CALENDAR_WIDTH;
		public static const CALENDAR_Y = DATE_Y;
		
		// timeline
		public static const TIMELINE_WIDTH:int = MEDIA_WIDTH;
		public static const TIMELINE_HEIGHT:int = 100;
		public static const TIMELINE_X:int = MEDIA_X;
		public static const TIMELINE_Y:int = MEDIA_Y + MEDIA_FULL_HEIGHT;
		public static const TIMELINE_COLOR = 0x5555FF;
		public static const TIMELINE_TICK:int = 10;
		
		// weather
		public static const WEATHER_WIDTH:int = 100;
		public static const WEATHER_HEIGHT:int = FILTER_HEIGHT;
		public static const WEATHER_ICON_WIDTH:int = 80;
		public static const WEATHER_ICON_HEIGHT:int = WEATHER_ICON_WIDTH;
		public static const WEATHER_X = FILTER_X + FILTER_WIDTH + COL_SPACE;
		public static const WEATHER_Y = FILTER_Y;
		public static const SUNNY:String = "http://hardon.stanford.edu/weather_imgs/sunny.png";
		public static const CLOUDY:String = "http://hardon.stanford.edu/weather_imgs/cloudy.png";
		public static const HAIL:String = "http://hardon.stanford.edu/weather_imgs/hail.png";
		public static const RAINY:String = "http://hardon.stanford.edu/weather_imgs/rainy.png";
		public static const SNOW:String = "http://hardon.stanford.edu/weather_imgs/snow.png";
		public static const STORM:String = "http://hardon.stanford.edu/weather_imgs/thunderstorm.png";
		
		// Google Maps location
		public static const LOCATION_WIDTH:int = 1024 - 2*LEFT_X - TITLE_WIDTH - COL_SPACE;
		public static const LOCATION_HEIGHT = TITLE_HEIGHT + FILTER_HEIGHT;
		public static const LOCATION_X = TITLE_X + TITLE_WIDTH + COL_SPACE;
		public static const LOCATION_Y = TITLE_Y;
		
		// main navigation buttons
		public static const BUTTON_WIDTH = 250;
		public static const BUTTON_HEIGHT = 30;
		public static const BUTTON_OUTLINE = 0x0055BB;
		public static const BUTTON_FILL = 0x0077DD;
		public static const BUTTON_FONT_SIZE:int = 20;
		public static const BUTTON_TEXT_Y:Number = BUTTON_FONT_SIZE/10;
		public static const LBUTTON_X = LEFT_X;
		public static const LBUTTON_Y = TIMELINE_Y + TIMELINE_HEIGHT + ROW_SPACE;
		public static const RBUTTON_X = 1024 - LEFT_X - BUTTON_WIDTH;
		public static const RBUTTON_Y = LBUTTON_Y;
		
		// Google Maps API keys
		// hardon.stanford.edu: ABQIAAAA4rsy6oFmtdh07Ul12jxkchTkuwkKlU4s7cdblE9QRdlrziVB1hSokUC0GjXvQwtuh1Gm1v3AvzBmEw
		// stanford.edu/~nchen11: ABQIAAAA4rsy6oFmtdh07Ul12jxkchQL1rEGMTC1RXCLR-95cVh2DSNS1hSGN11yADs58VtIhRazTM2oD261SA
	}
}